package com.dexin.yang.manager.controller.login;

import java.util.List;




import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.dexin.yang.entity.User;
import com.dexin.yang.manager.service.loginService.ILoginService;

@Controller
@RequestMapping(value="manager/login")
public class LoginController {

	@Autowired(required=true)
	private ILoginService loginService;
	
	@Autowired(required=true)
    private CacheManager cacheManager;
	
	@RequestMapping(value="index")
	public String login(){
		System.out.println(cacheManager.getCache("userCache").get("getUser")+"++++++++++++++++++++++++");
		List<User> list1 = loginService.getUser();
		List<User> list2 = loginService.getUser();
//		loginService.save();
		System.out.println((list1).equals(list2)+"=====================");
		return "manager/login/index";
	}
}
